<?php
/*code here*/
/* Redirect user if they already logged */
if(Auth::hasAuth('current_user')){
    //$this->view->current_user = Auth::getAuth('current_user');
}
else{
    header('location: /');
    
}
    $auth = Auth::getAuth('current_user');
    $user_level_id = $auth['user_level_id'];
        // Allow User View
        functions::redirection_admin($user_level_id);
	
	
	
$auth = Auth::getAuth('current_user');
functions::userLevelAuth($auth['user_level_id']);
// echo $auth['user_level_id'];
/*code here(end)*/
$form_id = $_GET['form_id'];
$id = $_GET['id'];
$db = new Database();
$form = new Form($db,$form_id);
if($form->company->id!=$auth['company_id'] && $id!=0){
	header("location:/");
}
$this->setLayout();